package STUDENT.TRANBANGTUNG.day05_13_2016.doicannang;

public class cannangModel {
	double result = 0;

	public double doicannang(cannangObject objcannang) {
		if (objcannang.getyeucau().contentEquals("kg")) {
			result = objcannang.getcannang() / 2.2;
		} else if (objcannang.getyeucau().contentEquals("pound")) {
			result = objcannang.getcannang() * 2.2;
		}
		return result;
	}
}
